package com.zbg;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

@WebServlet(name = "ServletWel",urlPatterns = "/ServletWel")
public class ServletWel extends HttpServlet {
    @Override
    public void destroy() {
        System.out.println("首页被销毁被创建");
    }

    @Override
    public void init() throws ServletException {
        System.out.println("首页被创建");
    }

    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    }

    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        getServletContext().setAttribute("a","a");



        request.getRequestDispatcher("/login/wel.html").forward(request,response);

    }
}
